package com.obixlabs.security.credentialsstore.server.dao;

import com.obixlabs.security.credentialsstore.exception.EntryNotFoundException;
import com.obixlabs.security.credentialsstore.model.BaseUser;
import com.obixlabs.security.credentialsstore.model.ObixGroup;
import com.obixlabs.security.credentialsstore.model.ObixGroups;
import com.obixlabs.security.credentialsstore.model.ObixPermission;

public interface GroupDAO 
{
	ObixGroups findByPermission(ObixPermission permission) throws EntryNotFoundException;
	
	ObixGroups findByUser(BaseUser user);
	
	ObixGroups findAll();
	
	ObixGroup save(ObixGroup group);
	
	void delete(ObixGroup group);

	ObixGroup findByName(String name);
	
	//INTERNAL addUserToGroup(ObixGroup, BaseUser)
	//INTERNAL removeUserFromGroup(ObixGroup, BaseUser)	
}